<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="formDisabled">
      <!-- 主表单区域 -->
      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
        <a-row>
          <a-col :span="8" >
            <a-form-model-item label="时间" :labelCol="{ span: 6 }" :wrapperCol="{ span: 18 }" prop="date">
              <a-input v-model="model.date" placeholder="请输入时间" ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="8" >
            <a-form-model-item label="总分" :labelCol="{ span: 6 }" :wrapperCol="{ span: 18 }" prop="totalScore">
              <a-input-number v-model="model.totalScore" placeholder="请输入总分" style="width: 100%" />
            </a-form-model-item>
          </a-col>
          <a-col :span="24" >
            <a-form-model-item label="名称" :labelCol="{span:2}" :wrapperCol="{span:22}" prop="projectName">
              <a-input v-model="model.projectName" placeholder="请输入名称" ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24" >
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:22}" prop="remark">
              <a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </j-form-container>
      <!-- 子表单区域 -->
    <member-list ref="memberListRef" v-model="memberListTable.dataSource" :project-info="model" :disabled="formDisabled" :loading="memberListTable.loading"></member-list>
  </a-spin>
</template>

<script>

import { getAction } from '@/api/manage'
import MemberList from '@views/gfxy/common/memberList'
import GYearPicker from '@views/gfxy/common/GYearPicker'
import { GfxyMemberListMixin } from '@/mixins/GfxyMemberListMixin'

  export default {
    name: 'QtxmhxzbForm',
    mixins: [GfxyMemberListMixin],
    components: {
      MemberList,GYearPicker
    },
    data() {
      return {
        validatorRules: {
          date: [
            { required: true, message: '请输入时间!'},
          ],
          totalScore: [
            { required: true, message: '请输入认证类型!'},
          ],
          projectName: [
            { required: true, message: '请输入名称!'},
          ],
        },
        url: {
          add: "/items/qtxmhxzb/add",
          edit: "/items/qtxmhxzb/edit",
          queryById: "/items/qtxmhxzb/queryById",
          getTotalScore: "/items/qtxmhxzb/getTotalScore",
          memberList: {
            list: "/items/qtxmhxzb/queryMemberListByMainId"
          },
        }
      }
    },
    props: {
      //表单禁用
      disabled: {
        type: Boolean,
        default: false,
        required: false
      },
      itemValue:{
        type: Number,
        required: true,
      },
      date:{
        type: String,
        required: true,
      }
    },
    computed: {
      formDisabled(){
        return this.disabled
      },
    },
    created () {
    },
    methods: {

    }
  }
</script>

<style scoped>
</style>